package com.hdax.dm.rest;

import com.hdax.dm.common.api.LinkUserConreollerApi;
import com.hdax.dm.service.LinkUserService;
import com.hdax.dm.service.UserService;
import com.hdax.dm.user.DmLinkUser;
import com.hdax.dm.user.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LinkUserRestService implements LinkUserConreollerApi {

    @Autowired
    private LinkUserService linkUserService;
    @Autowired
    private UserService userService;

    @Override
    public List<DmLinkUser> userList(Long userid) {

        return linkUserService.userList(userid);
    }

    @Override//根据id查询内容
    public List<DmLinkUser> userListId(Long id) {
        return linkUserService.userListId(id);
    }

    @Override
    public List<User> users(String phone) {
        return userService.loginUser(phone);
    }

    @Override
    public Boolean deleteLinkUser(Long linkId) {
        return linkUserService.deleteLinkUserId(linkId);
    }

    @Override
    public Boolean validatebuyerexist(String idCard) {
        return linkUserService.validatebuyerexist(idCard);
    }

    @Override
    public Boolean addticketbuyer(DmLinkUser user) {
        return linkUserService.addticketbuyer(user);
    }


}
